package com.itheima.homework.String类;

import java.util.Scanner;

public class Demo4 {
    public static void main(String[] args) {
        System.out.println("请输入发帖内容:");
        Scanner sc=new Scanner(System.in);
        String next = sc.next();
        String[] keyArray = {"特朗普","普京"};
        String replace = next.replace(keyArray[0], "*");
        String replace1 = replace.replace(keyArray[1], "*");
        System.out.println(replace1);
    }
}
